package com.kuaidi100.sdk.response.ThirdPlatform;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * @Author: ligl
 * @Date: 2022-02-17 15:48
 */
public class CommitTaskResp {
    /**
     * 任务总数
     */
    private int total;
    /**
     * 任务类别
     */
    private List<TaskDetails> tasks;

    @Override
    public String toString() {
        try {
            ObjectMapper objectMapper = new ObjectMapper();
            return objectMapper.writeValueAsString(this);
        } catch (Exception e) {
            return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                    .append("total", total)
                    .append("tasks", tasks)
                    .toString();
        }
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<TaskDetails> getTasks() {
        return tasks;
    }

    public void setTasks(List<TaskDetails> tasks) {
        this.tasks = tasks;
    }
}
